import { Navigate } from "react-router-dom"
import Home from "../components/Home.jsx"
import About from "../components/About.jsx"
import News from "../components/News.jsx"
import Message from "../components/Message.jsx"
export default [
  {
    path: "/",
    element: <Navigate to="/about" />,
  },
  {
    path: "/about",
    element: <About />,
  },
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "",
        element: <Navigate to="news" />,
      },
      {
        path: "news",
        element: <News />,
      },
      {
        path: "message",
        // path: "message/:id",
        // params 传参
        element: <Message />,
      },
    ],
  },
]
